/* 首页样式 */
.home-container {
  padding: 16px;
  padding-bottom: 100px; /* 为固定的TabBar留出空间 */
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  min-height: 100vh;
  color: #333;
}

/* 顶部通告栏 */
.announcement-bar {
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  border-radius: 16px;
  padding: 16px 20px;
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 16px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
  position: relative;
  overflow: hidden;
}

.announcement-icon {
  font-size: 20px;
  color: #ff6b35;
  flex-shrink: 0;
}

.announcement-content {
  flex: 1;
  height: 24px;
  overflow: hidden;
  position: relative;
}

.announcement-text {
  transition: transform 0.5s ease;
  height: 100%;
}

.announcement-item {
  height: 24px;
  line-height: 24px;
  font-size: 14px;
  color: #333;
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.announcement-dots {
  display: flex;
  gap: 6px;
  flex-shrink: 0;
}

.dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #ddd;
  cursor: pointer;
  transition: all 0.3s ease;
}

.dot.active {
  background: #1890ff;
  transform: scale(1.2);
}

.dot:hover {
  background: #1890ff;
  transform: scale(1.1);
}

.announcement-status {
  font-size: 16px;
  color: #1890ff;
  flex-shrink: 0;
  cursor: pointer;
  transition: all 0.3s ease;
  opacity: 0.7;
}

.announcement-status:hover {
  opacity: 1;
  transform: scale(1.1);
}

/* 顶部状态栏 */
.status-bar {
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  border-radius: 16px;
  padding: 20px;
  margin-bottom: 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

.status-info {
  flex: 1;
}

.status-text {
  font-size: 18px;
  font-weight: 600;
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.status-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  display: inline-block;
}

.status-dot.online {
  background: #52c41a;
  box-shadow: 0 0 8px rgba(82, 196, 26, 0.5);
}

.status-dot.offline {
  background: #ff4d4f;
  box-shadow: 0 0 8px rgba(255, 77, 79, 0.5);
}

.status-time {
  font-size: 14px;
  color: #666;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.session-time {
  font-size: 12px;
  color: #1890ff;
  font-weight: 500;
  background: rgba(24, 144, 255, 0.1);
  padding: 2px 8px;
  border-radius: 8px;
  display: inline-block;
}

.login-tip {
  font-size: 12px;
  color: #ff4d4f;
  font-weight: 500;
  background: rgba(255, 77, 79, 0.1);
  padding: 4px 8px;
  border-radius: 8px;
  margin-top: 4px;
  display: inline-block;
}

.rider-info {
  font-size: 12px;
  color: #52c41a;
  font-weight: 500;
  background: rgba(82, 196, 26, 0.1);
  padding: 4px 8px;
  border-radius: 8px;
  margin-top: 4px;
  display: inline-block;
}

.status-toggle {
  border-radius: 20px;
  padding: 8px 20px;
  font-weight: 500;
  border: none;
  transition: all 0.3s ease;
}

.status-toggle.online {
  background: #ff4d4f;
  color: white;
}

.status-toggle.offline {
  background: #52c41a;
  color: white;
}

/* 响应式设计 */
@media (max-width: 375px) {
  .home-container {
    padding: 12px;
  }
  
  .announcement-bar {
    padding: 14px 16px;
  }
  
  .announcement-item {
    font-size: 13px;
  }
  
  .status-bar {
    padding: 16px;
  }
}

/* 动画效果 */
.announcement-bar {
  animation: slideInDown 0.6s ease forwards;
}

.status-bar {
  animation: slideInUp 0.6s ease 0.2s forwards;
  opacity: 0;
  transform: translateY(20px);
}

@keyframes slideInDown {
  from {
    opacity: 0;
    transform: translateY(-30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes slideInUp {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* 通告栏悬停效果 */
.announcement-bar:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.15);
}

/* 通告轮播指示器动画 */
.dot {
  animation: pulse 2s infinite;
}

.dot.active {
  animation: none;
}

@keyframes pulse {
  0%, 100% { opacity: 0.6; }
  50% { opacity: 1; }
}

/* 位置信息卡片 */
.location-card {
  margin: 16px 0;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
  animation: slideInUp 0.6s ease 0.4s forwards;
  opacity: 0;
  transform: translateY(20px);
}

.location-summary {
  padding: 20px;
}

.location-summary h4 {
  margin: 0 0 16px 0;
  color: #1890ff;
  font-size: 16px;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 8px;
}

.location-summary p {
  margin: 8px 0;
  color: #666;
  font-size: 14px;
  font-family: 'Courier New', monospace;
}

/* 位置详情样式 */
.location-details {
  margin-bottom: 16px;
}

.location-details p {
  margin: 10px 0;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  background: #f8f9fa;
  border-radius: 8px;
  border-left: 3px solid #1890ff;
}

.location-details strong {
  color: #333;
  min-width: 60px;
}

/* 状态指示器样式 */
.status-indicator {
  padding: 4px 8px;
  border-radius: 12px;
  font-size: 12px;
  font-weight: 500;
  margin-left: 8px;
}

.status-indicator.online {
  background: #f6ffed;
  color: #52c41a;
  border: 1px solid #b7eb8f;
}

.status-indicator.offline {
  background: #fff2f0;
  color: #ff4d4f;
  border: 1px solid #ffccc7;
}

/* 位置操作按钮样式 */
.location-actions {
  display: flex;
  justify-content: center;
  gap: 12px;
  padding-top: 16px;
  border-top: 1px solid #f0f0f0;
}

.location-actions .ant-btn {
  border-radius: 20px;
  font-weight: 500;
  box-shadow: 0 2px 8px rgba(24, 144, 255, 0.2);
  transition: all 0.3s ease;
}

.location-actions .ant-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(24, 144, 255, 0.3);
}

/* 统计信息卡片 */
.stats-card {
  margin: 16px 0;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
  animation: slideInUp 0.6s ease 0.6s forwards;
  opacity: 0;
  transform: translateY(20px);
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  padding: 20px;
}

.stat-item {
  text-align: center;
  padding: 16px 8px;
  background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
  border-radius: 12px;
  color: white;
  transition: all 0.3s ease;
}

.stat-item:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.2);
}

.stat-number {
  font-size: 24px;
  font-weight: 700;
  margin-bottom: 8px;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.stat-label {
  font-size: 12px;
  opacity: 0.9;
  font-weight: 500;
}

/* 响应式统计网格 */
@media (max-width: 480px) {
  .stats-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    padding: 16px;
  }
  
  .stat-item {
    padding: 12px 6px;
  }
  
  .stat-number {
    font-size: 20px;
  }
  
  .stat-label {
    font-size: 11px;
  }
}